#include "mythread.h"

#include <QDebug>
#include <QThread>

MyThread::MyThread(QObject *parent)
    : QObject(parent)
{

}

MyThread::~MyThread()
{

}

//模拟耗时任务
void MyThread::doTask()
{
    qDebug() << "MyThread id = " << QThread::currentThreadId();

    for(int idx = 1; idx < 10; ++idx)
    {
        qDebug() << "idx = " << idx;
        QThread::msleep(1000);
    }

    emit signalQuit();
}
